package com.teach.config;

/* *
 *类名：AlipayConfig
 *功能：基础配置类
 *详细：设置帐户有关信息及返回路径
 *修改日期：2017-04-05
 *说明：
 *以下代码只是为了方便商户测试而提供的样例代码，商户可以根据自己网站的需要，按照技术文档编写,并非一定要使用该代码。
 *该代码仅供学习和研究支付宝接口使用，只是提供一个参考。
 */

public class CertificateAlipayConfig {
	
//↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

	// 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
	public static String app_id = "2016101200669653";
	
	// 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDGoDiVt1kPu2fhCO13dRmaWNqb7y1DQb4DcPnlxFzs19VkG5F786+pfkLYtVdoV22f1iLQrc7oTnA0HLlp2L8fZsdzMhYULWCOHTuB1FFtsLDNrWxzn/PQHSCklhS8eKs+Vqe84kMS1y11MA1p7aKLNCCxaocJr+oGi/SvReVrFbt3iTNt4rSHZueK+LVsSSqiUbBe2MTubWmqVCGJtOcR5MuJ1GBXR9QmVudxYoOcVM8juhMpm2yNmB3Taq1oal2G31HGb+8P4d5wxBP/+C346JKTJ55KSIztrG7v8bhbAGlhO98GkX0ktH44Koy0Y+ujrRTz9awebngj+RQbotM3AgMBAAECggEACbwYid3uk4LP2Iujd9NZaeMo87OJOF6kfW6wEL7K/yCk6L8hJj4PQfNaO1zH5+lBCjBojGm4VlJh1WwC+lkRJOzYoaC2zE5dCRoNrJNHWmTqhWoWgqQ4Qt7qlqZ0ZbhUTD3bArrkJqw9Ih00yxhGeyQW5hseey8P/Tomx+BZGiJka/kPv9tPQDputJiEad3wGUoK1V+/kf/91mANUHVfeOrVsiTkFo/Xm4/kfbfCM1T2ZKqeSPa00PMlljG+KK8e6LkcIkKXmI+P4qF/rARRZugdi1iCMTesuxnyZoIEu0UmTXTgBRpeMfFhh1YC8piJ8KsyMNQmWdlFgmHnoP4WAQKBgQDpPvoMo1HmBRCfWD8lcagK474foqM2gGTZvHCNAUAwD46jOtgC1FqA+j5opnC6EP03JjUMAqASfWE561Bq4Id4qLxAPQd/nOQ9ajWol6g2atvAUH8D8KsgAF0AEYQqJ0GPRr91bNe479020S+z1Ji7fIOQVSdP0z6GXnmOzyPGwQKBgQDaAKZyRlY3wF6n6ryrhmWrcUFN1TBhVsuu+8QLFm206exsxgMzeQy2r81A0PtboRZri/HS5tK4xpLSlZXtiQ89ggBAIeXleW8WfVwvCFpf3aFZKFpfjW5n7HWR5q74lIMcNQMmLNKwam8SbG+qmWD7xdYVCWtHF+PNIvRclGjP9wKBgQCj3tcW4fe8P3q6OOnEiOGjJPaCi2VX+UThpP7+Ug6itYtlKwZwlnkvfKE0LRut3hnJEVLbqUyFMQmKA8VwEWecYhBAoaAPDE9exqwEUuifstvJdcSHJCNWTGsKjUPpycLJws7o1RuKlxs4VCfLlGXp80ULtof0EVowVVfZ+bYNAQKBgByY2zzAV00G8iPK2icSAUJFIBDqt2b9cMiqhCQENC34RahbLU5SQcWxOBaZk2+IqR1AhV9qIhhVDCuNrdY0FYi3BftjtvmsPVNQ7IfK67gJpcHBVmGUdvgw/5c9EJTRPoWzuo8GcDjuLVXYXameZyd/4z5tNuJjkuF1BWMjoMAvAoGAEqFhpH7kVuWy4fycBL8jTEpHyPklQ7r7tdPCekUEoYOuhPHXGIorbvw9to0nG7tW5w+PcTljeSLxdZNM/Bs9c6neKveMIzWPHzHW6iwcF8fS6d/b74Ufr88ASsW0+T6FwOP544hiqe0EqZgSOJTfEeHdiKhtKOCwwbfTsGA1G8E=";
	
	// 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkNE8dPbOGuZKbPiKat2Kmx1QHKu47rzvYiP/Cflc+WF2ny9L/n6kqK8pJ3TSFIEaL/Iur58oEod5ZUiPMFbuMPJUDsqiwMkm5N+bra0cOKdgc9FcKPGGRQ4RPvzRQW+Tr/Q20kooV9fPYcrsgvANHADSqYr/ux62eYCEDbjAGGn1FdXFTi0OLuInm7Wu9koML64MImRR3noQc4xobNh+NVZuKm7qihZrjOmRN41hMJim4i/GaesuRPUPs/F7HYpJ1yZxeVfvYYEQbYW+Yl6cOA0vttM2gvs/naqxWyVEuGu3wayDICV/1hGem6Yuf7VNQ+I7oHPICLgFT1aMdgSKMwIDAQAB";

	// 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
	public static String notify_url = "http://1.jlzhou.top/alipay.trade.page.pay-JAVA-UTF-8/notify_url.jsp";

	// 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
	public static String return_url = "http://localhost:8080";

	// 签名方式
	public static String sign_type = "RSA2";
	
	// 字符编码格式
	public static String charset = "utf-8";
	
	// 支付宝网关
//	public static String gatewayUrl = "https://openapi.alipay.com/gateway.do";
	//支付宝沙箱环境
	public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";
	
	// 支付宝网关
	public static String log_path = "C:\\";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /** 
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
//    public static void logResult(String sWord) {
//        FileWriter writer = null;
//        try {
//            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
//            writer.write(sWord);
//        } catch (Exception e) {
//            e.printStackTrace();
//        } finally {
//            if (writer != null) {
//                try {
//                    writer.close();
//                } catch (IOException e) {
//                    e.printStackTrace();
//                }
//            }
//        }
//    }
}

